package com.moorror.codegenvel.common.textfield;

import com.intellij.icons.AllIcons;
import com.intellij.openapi.actionSystem.AnAction;
import com.intellij.openapi.actionSystem.AnActionEvent;
import com.intellij.openapi.project.DumbAware;
import com.moorror.codegenvel.common.tree.TreePanelMark;
import org.jetbrains.annotations.NotNull;

import java.util.function.Consumer;

/**
 * @Author jiyanghuang
 * @Date 2024/4/27 19:25
 */
public class MRRefreshAction extends AnAction implements DumbAware {

    private Consumer<TreePanelMark> consumer;

    public MRRefreshAction(Consumer<TreePanelMark> consumer){
        super("Refresh", "Refresh", AllIcons.Actions.Refresh);
        this.consumer = consumer;
    }

    @Override
    public void actionPerformed(@NotNull AnActionEvent e) {
        consumer.accept(null);
    }


}
